﻿@{
    ViewBag.Title = "企业资质明细列表";
    Layout = Url.Content("~/Views/Shared/_Layout.cshtml");
}

@section header{
    @Styles.Render("~/Content/element-ui/lib/theme-chalk/index.css")
}
<div class="page-header">
    <h1>
        @ViewBag.Title
        <small></small>
    </h1>
</div>
<div class="container" id="PAGE_MODEL">
    <div class="row">
        <!--查询开始-->
        <div class="form-group col-sm-12">
            <form class="form-inline" v-on:submit.prevent="getQualificationDetailListindex()">

                <div class=form-group>
                    <div class="input-group">
                        <span class="input-group-addon">
                            资质要求
                        </span>
                        <input type="text" class="form-control" placeholder="输入一个关键字" id="keyword">
                    </div>
                </div>

                <div class="btn-group">
                    <button class="btn btn-primary" type="submit">
                        <i class="fa fa-fw fa-search"></i>
                        查询
                    </button>
                    <button class="btn btn-danger" type="button" v-on:click="NewQualificationDetail()">
                        <i class="fa fa-fw fa-file-o"></i>
                        新建
                    </button>
                </div>
            </form>
        </div>
        <!--查询开始结束-->
        <!--表单开始-->
        <div class="col-md-12 table-responsive">
            <table class="table table-bordered table-hover">
                <thead class="bg-primary">
                    <tr>
                        <th class="text-center text-nowrap">序号</th>
                        <th class="text-center text-nowrap">资质要求</th>
                        <th class="text-center text-nowrap">业务范围</th>
                        <th class="text-center text-nowrap">备注</th>
                        <th class="text-center text-nowrap">操作</th>
                    </tr>
                </thead>
                <tbody v-for="(v,index) in VmQualificationDetails" v-cloak>
                    <tr>
                        <td class="text-center">
                            <span v-text="pageindex*pagesize+index+1"></span>
                        </td>
                        <td><span v-html="return2Br(v.Details_Require)"></span></td>
                        <td><span v-html="return2Br(v.Details_Range)"></span></td>
                        <td><span v-html="return2Br(v.Details_Remark)"></span></td>
                        <td class="text-center text-nowrap">
                            <a v-bind:href="'@Url.Action("QualificationDetail")'+'?DetailId='+v.DetailId">
                                <i class="fa fa-fw fa-edit"></i>编辑
                            </a>
                            <a href="#" v-on:click="deleteQualificationDetail(v.DetailId)">
                                <i class="fa fa-fw fa-trash"></i>删除
                            </a>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <!--表单结束-->
        <!--分页开始-->
        <div class="col-md-12">
            <div class="block">
                <span class="demonstration"></span>
                <el-pagination @@size-change="handleSizeChange" @@current-change="handleCurrentChange" :current-page.sync="currentpage" :page-sizes="pagesizes"
                               :page-size="pagesize" layout="prev, pager, next, jumper,total, sizes" :total="total">
                </el-pagination>
            </div>
        </div>
        <!--分页结束-->

    </div>
</div>

@section Script{

    <script src='@Url.Content("~/Scripts/Qualification/QualificationDetail.js")' type="text/javascript"></script>

    <!-- 引入组件库 -->
    <script src='@Url.Content("~/Content/element-ui/lib/index.js")' type="text/javascript"></script>

    <script type="text/javascript">
    //链接地址定义
    var URLs = {
        URL_GET_QUALIFICATIONDETAILLIST: '@Url.Action("GetQualificationDetailList", "QualificationDetail")'         //获取列表
            ,
        URL_GET_ONEQUALIFICATIONDETAIL: '@Url.Action("GetOneQualificationDetail", "QualificationDetail")'           //获取一条要编辑的数据
            ,
        URL_DELETE_QUALIFICATIONDETAIL: '@Url.Action("deleteQualificationDetailData", "QualificationDetail")'       //删除文章
            ,
        URL_GOTO_NEWQUALIFICATIONDETAIL: '@Url.Action("QualificationDetail", "QualificationDetail")'                //跳转到新建的页面
    }

    $(function () {

        //打开页面就加载列表
        vm.getQualificationDetailListindex();
    });

    </script>
}
